package com.itheima.entity;

import com.hzheima.util.ImageUtil;
import com.itheima.config.AppConfig;

import java.awt.*;
import java.awt.image.BufferedImage;

public class Bullet extends FlyingObject{

    public Bullet() {
    }

    public Bullet(BufferedImage img, int x, int y, int width, int hight) {
        super(img, x, y, width, hight);
    }

    public Bullet(int px, int py) {
        img= ImageUtil.getImg("fire.png");

        width=img.getWidth();
        hight = img.getHeight();

        x=px+32;
        y=py-80;

        speed=20;
    }

    public void moveUp(){
        this.y-=speed;
    }
}
